﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace iemtm.WeChat.Core.Managers
{
    /// <summary>
    /// 用户管理接口
    /// </summary>
    public interface IUserManager
    {
    


        /// <summary>
        /// 检查用户是否有效-存在
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<UserAccount> CheckUserAsync(int userId);

        /// <summary>
        /// 检查用户是否有效-存在
        /// </summary>
        /// <param name="UserCode">用户账号</param>
        /// <returns></returns>
        Task<UserAccount> CheckUserAsync(string UserCode);

        /// <summary>
        /// 检查用户是否有效-存在
        /// </summary>
        /// <param name="UserCode">用户账号</param>
        /// <param name="UserPwd">用户密码</param>
        /// <returns></returns>
        Task<UserAccount> CheckUserAsync(string UserCode,string UserPwd);

        /// <summary>
        ///  获取用户
        /// </summary>
        /// <param name="WxOpenId">微信用户唯一标识</param>
        /// <returns></returns>
        Task<UserAccount> GetUserByWxOpenIdAsync(string WxOpenId);
        /// <summary>
        /// 绑定微信
        /// </summary>
        /// <param name="user">用户</param>
        /// <param name="WxOpenId">微信用户唯一标识</param>
        ///  <param name="WxHreadImg">微信用户头像</param>
        /// <returns></returns>
        Task<bool> BindWeChat(UserAccount user, string WxOpenId, string WxHreadImg);

        /// <summary>
        /// 绑定微信
        /// </summary>
        /// <param name="user">用户</param>
        /// <returns></returns>
        Task<bool> UNBindWeChat(UserAccount user);

        ///// <summary>
        ///// 用户可见区域过滤
        ///// </summary>
        ///// <param name="selAreaCode"></param>
        ///// <param name="logininfo"></param>
        ///// <param name="tablePrex"></param>
        ///// <returns></returns>
        //string GetAreaFilterStrWx(string selAreaCode, UserAccount logininfo, string tablePrex = "");
        
        }
}
